# 用户的专辑 　在为完成练习8-7编写的程序中，编写一个while 循环，让用户输入专辑的歌手和名称。
# 获取这些信息后，使用它们来调用函数make_album() 并将创建的字典打印出来。
# 在这个while 循环中，务必提供退出途径。
def make_album(singer_name, album_name, songs_num=None):
	album = {'singer name':singer_name.title(), 'album name':album_name}
	if songs_num:
		album['songs number'] = songs_num
	return album

while True:
	singer_name = input("Please input singer name(input q to exist): ")
	if singer_name == 'q':
		break
	album_name = input("Please input album name(input q to exist): ")
	if album_name == 'q':
		break
	songs_num = input("Please input songs number(input q to exist): ")
	if songs_num == 'q':
		break
	album = make_album(singer_name, album_name, songs_num)
	print(album)